<?php

namespace app\common\validate;

use think\Validate;

/**
 * Description of Article
 *
 * @author Administrator
 */
class Custom extends Validate
{
    //验证规则
    protected $rule = [
        'emaill'=>'require|max:50',
        'phone'=>'require|max:50',
        'title'=>'require|max:150'
    ];
    
    //错误信息
    protected $message  = [
        'emaill.require'                 => 'emaill必填',
        'phone.require'                 => 'phone必填',       
        'emaill.max'                     => 'emaill小于50字符',
        'phone.unique'                  => 'phone小于50字符',
        'title.require'							=>'标题必填',
        'title.max'							=>'标题在150个字符或者50个汉字'
    ];
}
